package com.epay;

import cn.stylefeng.roses.core.config.MybatisDataSourceAutoConfiguration;
import cn.stylefeng.roses.core.config.MybatisPluginAutoConfiguration;
import cn.stylefeng.roses.core.config.RedisAutoConfiguration;
import cn.stylefeng.roses.core.config.WebAutoConfiguration;
import com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;

import java.util.concurrent.ConcurrentHashMap;

@Slf4j
@EnableAutoConfiguration(exclude = {WebAutoConfiguration.class, RedisAutoConfiguration.class, RabbitAutoConfiguration.class, MybatisDataSourceAutoConfiguration.class, MybatisPluginAutoConfiguration.class, SecurityAutoConfiguration.class, DataSourceAutoConfiguration.class, SecurityAutoConfiguration.class, ManagementWebSecurityAutoConfiguration.class, MybatisPlusAutoConfiguration.class})
@SpringBootApplication(exclude = {WebAutoConfiguration.class, RedisAutoConfiguration.class, RabbitAutoConfiguration.class, MybatisDataSourceAutoConfiguration.class, MybatisPluginAutoConfiguration.class, SecurityAutoConfiguration.class, DataSourceAutoConfiguration.class, SecurityAutoConfiguration.class, ManagementWebSecurityAutoConfiguration.class, MybatisPlusAutoConfiguration.class})
@ComponentScan(basePackages = "com")
public class RechargeApp extends SpringBootServletInitializer {

    public static void main(String[] args) throws  Exception {


        SpringApplication.run(RechargeApp.class, args);
        log.info(RechargeApp.class.getSimpleName() + " is success!");
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(RechargeApp.class);
    }

}
